package base.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.Tag;

public class BsJumbotronTag extends BsContainerTag<Object> {

	private static final long serialVersionUID = 1L;
	
	private String text = "";
	private String href = "";
	
	@Override
	public int doStartTag() throws JspException {
		StringBuffer tag = new StringBuffer();
		tag.append("<div class='col-md-" + colWidth + "'>\n");
		tag.append("<div class='jumbotron' style='padding: 15px;'>\n");
		tag.append("<h1>" + caption  + "</h1>\n");
		tag.append("<p>" + text + "</p>\n");
		tag.append("<p><a href='" + href + "' class='btn btn-info' role='button'>更多</a></p>\n");
		output(tag);
		return Tag.EVAL_PAGE;
	}
	
	@Override
	public int doEndTag() throws JspException {
		
		StringBuffer tag = new StringBuffer();
		tag.append("</div>");
		tag.append("</div>");
		output(tag);
		return Tag.EVAL_PAGE;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}

}
